<?php 

 header("Content-type: text/html; charset=utf-8");
require("conn.php");

$user = $_POST['user'];
$user=json_decode($user,true);


$sql = "INSERT INTO user (username,password,tel,sex,openid,age,pic,nian,ban)VALUES('".$user['username']."','".$user['password']."','".$user['tel']."','".$user['sex']."','".$user['openid']."','".$user['age']."','".$user['pic']."','".$user['nian']."','".$user['ban']."')";
if (mysql_query($sql,$conn)) {
	echo 'y';
}else{
	echo mysql_error();
}